using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace MyCleverWizard
{
    public partial class InfoSheet : UserControl
    {
        public InfoSheet()
        {
            InitializeComponent();            
        }

        private void InfoSheet_Load(object sender, EventArgs e)
        {
            Form1 wizardForm = (Form1)this.ParentForm;

            // add mission name to the headline
            this.lblHeadline.Text += "\n" + wizardForm.MissionReference.Name;
            
            // refresh textLabel
            this.lblText.Text = "";
            foreach (KeyValuePair<string, string> specifications in wizardForm.MissionReference.Specification)
            {
                this.lblText.Text += specifications.Key + ":\n";
                this.lblText.Text += specifications.Value + "\n\n";
            }
        }
    }
}
